const initial = {
  record: [],
  login:false,
  userList:[],
}
const chat = function (state = initial, action) {
  switch (action.type) {
    case "CHAT": {
      console.log("action更变状态",action,state);
      return {
        ...state 
      }
    }
    case "LOGIN": {
      console.log("loginAction更变状态",action,state);
      return {
        ...state,
        ...action.state,
      }
    }
    case "USERLIST": {
      console.log("USERLISTAction更变状态",action,state);
      return {
        ...state,
        ...action.state,
      }
    }
    case "CHATLIST": {
      console.log("CHATLISTAction更变状态",action,state);
      return {
        ...state,
        ...action.state,
      }
    }
    default:
      return state
  }
}
export default chat;